<template>
	<view class="main-container">
		<text class="page-title">题库页面</text>
		
	</view>
</template>

<script setup>
	import { ref } from 'vue'
	import { onShow } from '@dcloudio/uni-app';
	const token = ref(getApp().globalData.userToken);
	const questions = ref('')
	const getQuestions = () =>{
		uni.request({
		    url: 'http://localhost:11000/courseSystem/subject/list', 
		    method: 'GET',
		    header: {
		        'token': token.value,
		    },
			data:{
				'page': 1,
				'size':5,
				'key': 10,
				'subjectType':0
			},
		    success: (res) => {
				console.log(res.data.data)
		    }
		});
	}
	onShow(() =>{
		console.log(token.value)
		getQuestions()
	})
</script>

<style>
	.main-container{
		display:flex;
		flex-direction: column;
		justify-content: center;
		text-align: center;
	}
	.page-title{
		margin: 25%;
	}	       
</style>
